1. Field of the Invention
The present invention relates to a focus adjustment technique for an image capturing apparatus such as an electronic still camera.
2. Description of the Related Art
Conventionally, when an autofocus (hereinafter referred to as AF) operation is performed in an electronic still camera, a video camera, or the like, a scheme has been used in which a lens position at which high-frequency components of a luminance signal obtained from an image sensor such as a CCD (Charge-Coupled Device) become maximum is determined as an in-focus position. The following scan scheme is well known as such a scheme. That is, an evaluation value (to be referred to as an AF evaluation value hereinafter) based on a high-frequency component of a luminance signal obtained from a predetermined area (to be referred to as a focus detection area hereinafter) within an image sensor is stored while driving a lens over the whole distance measurement range (a predetermined range from the closest distance to infinity). A lens position (to be referred to as a peak position hereinafter) corresponding to a local maximum value among the stored values is determined as an in-focus position. Note that the in-focus position indicates a lens position where an object is assumed to be in focus.
If the illuminance or the contrast of an object is low, since the S/N ratio lowers, an AF evaluation value randomly varies due to the influence of noise. This worsens the calculation accuracy of the peak position of the AF evaluation value. When an object (to be referred to as a main object) to be focused and a background coexist within a focus detection area, the peak position is on the far side due to the influence of the background. This situation is called background focusing.
There has been proposed the following method for suppressing the influence of a low S/N ratio. That is, a plurality of focus detection areas are set. If the level of the AF evaluation value is low, the difference between the peak positions of the focus detection areas is checked to ascertain if it satisfies a condition by falling within a predetermined range. An in-focus position is determined based on the AF evaluation values of focus detection areas which satisfy the condition. There has been provided a method of detecting a main object within an image and setting a plurality of focus detection areas for the area of the detected main object, as measures against background focusing.
For example, Japanese Patent Laid-Open No. 2000-307932 discloses the following method. A plurality of focus detection areas are set. If the difference between the maximum value and the minimum value of the AF evaluation value in each focus detection area does not fall within a predetermined threshold, whether the difference between the peak positions of the AF evaluation values of the focus detection areas falls within a predetermined range is checked. If there exist focus detection areas in which the difference between their peak positions falls within the predetermined range, the average peak position of these focus detection areas is determined as an in-focus position. Japanese Patent No. 04218720 discloses a method of setting a focus detection area in an area including part of a face and a body area, respectively, and comparing peak positions of the focus detection areas to determine an in-focus position.
In the technique disclosed in Japanese Patent Laid-Open No. 2000-307932, however, if background focusing occurs in a plurality of focus detection areas, the background may be in focus rather than a main object. Furthermore, if there are a plurality of focus detection areas in each of which a peak position randomly varies due to the influence of noise, the difference between the peak positions of the focus detection areas may fall within the predetermined range, and therefore, a position which is not, in fact, an in-focus position of the main object may be focused.
FIG. 3A is a view for explaining a method of setting focus detection areas, which has been disclosed in Japanese Patent No. 04218720. FIG. 3A shows focus detection areas 301a, 302a, and 303a which have been set for a face detection area, an area including part of a face, and a body area, respectively. As shown in FIG. 3A, background focusing occurs in all the focus detection areas 301a to 303a when the face turns away. A person in the background may be focused rather than a central person as a main object.